<?php

// create memory table
const TABLE_SIZE = 1024;
$table = new swoole_table(TABLE_SIZE);

// add column
$table->column('id',$table::TYPE_INT,4);
$table->column('name',$table::TYPE_STRING,8);
$table->column('age',$table::TYPE_INT,4);

$table->create();

$table->set('KEY1',[
    'id'=>1,
    'name'=>'tim',
    'age'=>20
]);
$table['KEY2'] = [
    'id'=>2,
    'name'=>'singwa2',
    'age'=>31
];
$table->incr('KEY1','age',2);
print_r($table->get('KEY1'));
$table->del('KEY1');
print_r($table->get('KEY1'));